{include file="public/head"/}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">{if $action=='edit'}编辑{else /}添加{/if}分组</div>
                <div class="layui-card-body" pad15>
                    <div class="layui-form" wid100 lay-filter="form">

                        <div class="layui-form-item">
                            <label class="layui-form-label">分组名称</label>
                            <div class="layui-input-inline">
                                <input type="text" name="name" lay-verify="required" placeholder="请设置分组名称" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">描述</label>
                            <div class="layui-input-block">
                                <textarea placeholder="请输分组描述" name="description" class="layui-textarea"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">排序</label>
                            <div class="layui-input-inline">
                                <input type="text" name="sort"  lay-verify="required" placeholder="从小到大排序" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                {if $info}
                                <input type="hidden" name="id">
                                {/if}
                                <button class="layui-btn" lay-submit lay-filter="{if $action=='edit'}edit-btn{else /}add-btn{/if}">确认保存</button>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/foot"/}
<script>
    layui.config({
        base: '__LAYADMIN__/',version: true
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','form','system_group'],function(){
        var form = layui.form;
        form.val("form", {$info|raw})
    });
</script>
</body>
</html>